import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

// 定义InvalidTimeFormatException类，继承自RuntimeException类
class InvalidTimeFormatException extends Throwable {
    public InvalidTimeFormatException(String message) {
        super(message);
    }
}

public class Task {

    public static void main(String[] args) {
        showTimeInfo("12:56");
        showTimeInfo("12:156");
    }

    public static void showTimeInfo(String text) {
        // 如果text的不等于5，抛出InvalidTimeFormatException异常
        /* TODO */

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
        LocalTime time = LocalTime.parse(text, formatter);
        System.out.printf("现在是%d点%d分%n", time.getHour(), time.getMinute());
    }


}